package com.itheima.d6_threadhomework0910.num1;

/**
 * 创建线程类
 */
public class MyThread extends  Thread{
    private MoneySystem ms;
    public MyThread(String name,MoneySystem ms) {
        super(name);
        this.ms = ms;
    }
    @Override
    public void run() {
        for (int i = 0; i < 10; i++) {
            ms.saveMoney(100);

        }
    }
}
